import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JPanel;
import javax.swing.JButton;
import com.jgoodies.forms.layout.FormLayout;
import com.jgoodies.forms.layout.ColumnSpec;
import com.jgoodies.forms.factories.FormFactory;
import com.jgoodies.forms.layout.RowSpec;
import javax.swing.SwingConstants;


public class StoreButtonPanel extends JPanel{

	/**
	 * This is the panel for the buttons in the Store.
	 * 
	 * @author Amy Lambeth
	 * @version 1.0 10/20/2011
	 */

	private static final long serialVersionUID = 3156476474262817421L;
	JButton btnBuy;
	JButton btnSell;
	JButton btnReturn;
	ButtonListener btnListen=new ButtonListener();
	/**
	 * Create the panel.
	 */
	public StoreButtonPanel() {
				setLayout(new FormLayout(new ColumnSpec[] {
						ColumnSpec.decode("max(3dlu;default)"),
						FormFactory.RELATED_GAP_COLSPEC,
						ColumnSpec.decode("103px"),},
					new RowSpec[] {
						FormFactory.PARAGRAPH_GAP_ROWSPEC,
						RowSpec.decode("29px"),
						FormFactory.RELATED_GAP_ROWSPEC,
						RowSpec.decode("29px"),
						FormFactory.RELATED_GAP_ROWSPEC,
						RowSpec.decode("29px"),}));
		
				btnBuy = new JButton("Buy");
				add(btnBuy, "3, 2, center, default");
				btnBuy.addActionListener(btnListen);
		
		btnSell = new JButton("Sell");
		add(btnSell, "3, 4, fill, top");
		btnSell.addActionListener(btnListen);
		
		btnReturn = new JButton("Return");
		add(btnReturn, "3, 6, fill, top");
		btnReturn.addActionListener(btnListen);
	}



	private class ButtonListener implements ActionListener{
		/**
		 * This is the action performed method which will control the button
		 * 
		 * @param e e is the ActionEvent which will be generated
		 * when the user clicks a button on the panel
		 *
		 */

		public void actionPerformed(ActionEvent e) {
			if (e.getSource() == btnBuy){

			}

			if (e.getSource() == btnSell){


			}

			if (e.getSource() == btnReturn){


			}

		} // End actionPerformed
	}
} // End StoreButtonPanel




